package com.ruoyi.his.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.his.mapper.WarnHospitalLogMapper;
import com.ruoyi.his.domain.WarnHospitalLog;
import com.ruoyi.his.service.IWarnHospitalLogService;

/**
 * 医院预警Service业务层处理
 *
 * @author Alan
 * @date 2024-03-09
 */
@Service
public class WarnHospitalLogServiceImpl implements IWarnHospitalLogService
{
    @Autowired
    private WarnHospitalLogMapper warnHospitalLogMapper;

    /**
     * 查询医院预警
     *
     * @param hospitalId 医院预警主键
     * @return 医院预警
     */
    @Override
    public WarnHospitalLog selectWarnHospitalLogByHospitalId(String hospitalId)
    {
        return warnHospitalLogMapper.selectWarnHospitalLogByHospitalId(hospitalId);
    }

    /**
     * 查询医院预警列表
     *
     * @param warnHospitalLog 医院预警
     * @return 医院预警
     */
    @Override
    public List<WarnHospitalLog> selectWarnHospitalLogList(WarnHospitalLog warnHospitalLog)
    {
        return warnHospitalLogMapper.selectWarnHospitalLogList(warnHospitalLog);
    }

    /**
     * 新增医院预警
     *
     * @param warnHospitalLog 医院预警
     * @return 结果
     */
    @Override
    public int insertWarnHospitalLog(WarnHospitalLog warnHospitalLog)
    {
        return warnHospitalLogMapper.insertWarnHospitalLog(warnHospitalLog);
    }

    /**
     * 修改医院预警
     *
     * @param warnHospitalLog 医院预警
     * @return 结果
     */
    @Override
    public int updateWarnHospitalLog(WarnHospitalLog warnHospitalLog)
    {
        return warnHospitalLogMapper.updateWarnHospitalLog(warnHospitalLog);
    }

    /**
     * 批量删除医院预警
     *
     * @param hospitalIds 需要删除的医院预警主键
     * @return 结果
     */
    @Override
    public int deleteWarnHospitalLogByHospitalIds(String[] hospitalIds)
    {
        return warnHospitalLogMapper.deleteWarnHospitalLogByHospitalIds(hospitalIds);
    }

    /**
     * 删除医院预警信息
     *
     * @param hospitalId 医院预警主键
     * @return 结果
     */
    @Override
    public int deleteWarnHospitalLogByHospitalId(String hospitalId)
    {
        return warnHospitalLogMapper.deleteWarnHospitalLogByHospitalId(hospitalId);
    }

    @Override
    public WarnHospitalLog getById(Long id) {
        return warnHospitalLogMapper.getById(id);
    }
}
